﻿using System.Collections.Generic;

namespace CubeCube.Tile.Rule
{
    public class TileActionRules
    {
        public TileActionRule[] actionRules = new TileActionRule[(int)TileActionRule.ActionType.COUNT];

        public TileActionRule GetRulesForAction(TileActionRule.ActionType action)
        {
            if (actionRules != null)
            {
                return actionRules[(int)action];
            }

            return null;
        }

        public void AddActionRule(TileActionRule actionRule)
        {
            actionRules[(int)actionRule.action] = actionRule;
        }

        //TODO: 序列化
    }
}
